package com.lggry.demo2genericity;

public class GenericDemo2 {
    public static void main(String[] args) {
        //目标：学会自定义泛型类
        //需求：模拟ArrayList集合，自定义一个集合MyArrayList
        MyArrayList<String> list = new MyArrayList<>();   //JDK7开始支持
        list.add("Java");
        list.add("Javascript");
        list.add("Python");

        System.out.println(list.remove("Javascript"));
        System.out.println(list);
    }
}
